package com.qhhc.mapper;

import com.qhhc.entity.CarAppointment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CarAppointmentMapper {
    
    List<CarAppointment> selectAllAppointments();
    
    CarAppointment selectAppointmentById(Long id);
    
    List<CarAppointment> selectAppointmentsByUserId(Long userId);
    
    List<CarAppointment> selectAppointmentsByCarId(Long carId);
    
    List<CarAppointment> selectAppointmentsByDealerId(Long dealerId);
    
    List<CarAppointment> selectAppointmentsByStatus(String status);
    
    List<CarAppointment> searchAppointments(Map<String, Object> params);
    
    int insertAppointment(CarAppointment appointment);
    
    int updateAppointment(CarAppointment appointment);
    
    int updateAppointmentStatus(@Param("id") Long id, @Param("status") String status);
    
    int deleteAppointment(Long id);
    
    int deleteAppointmentsByCarId(Long carId);
} 